﻿<UserControl x:Class="Tisbi.LawFirm.UI.Views.Controls.Forms.CustomersCRUDForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="380">
    <ScrollViewer>
        <StackPanel Orientation="Vertical">
            <StackPanel.Resources>
                <Style TargetType="StackPanel">
                    <Setter Property="Orientation" Value="Horizontal" />
                    <Setter Property="Margin" Value="0,0,0,4" />
                </Style>
            </StackPanel.Resources>
            <StackPanel>
                <Label Content="№:" Target="{Binding ElementName=TextUuid}"/>
                <TextBox x:Name="TextUuid" Text="{Binding Path=Model.Id}" IsReadOnly="True" Background="LightGray"/>
            </StackPanel>
            <StackPanel>
                <Label Content="Роль:" />
                <ComboBox ItemsSource="{Binding Path=CustomerTypes}"
                      SelectedItem="{Binding Path=SelectedCustomerType, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Короткое ФИО:" />
                <TextBox Text="{Binding Path=Title, Mode=TwoWay, ValidatesOnDataErrors=True}" />
            </StackPanel>
            <StackPanel>
                <Label Content="ФИО:" />
                <TextBox Text="{Binding Path=Model.FullFio, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Телефон:" />
                <TextBox Text="{Binding Path=Model.Phone, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Email:" />
                <TextBox Text="{Binding Path=Model.Email, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Адрес:" />
                <TextBox Text="{Binding Path=Model.Address, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Комментарий:" />
                <TextBox MinLines="10" Text="{Binding Path=Model.Description, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата создания:"  />
                <TextBox IsReadOnly="True" Background="LightGray" Text="{Binding Path=Model.Created, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel>
                <Label Content="Дата изменения:"  />
                <TextBox IsReadOnly="True" Background="LightGray" Text="{Binding Path=Model.Edited, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel x:Name="HeaderFioStackPanel">
                <Label Content="ФИО руководителя:" />
                <TextBox Text="{Binding Path=Model.HeaderFio, Mode=TwoWay}" />
            </StackPanel>
            <StackPanel x:Name="HeaderPostStackPanel">
                <Label Content="Должность руководителя:" />
                <TextBox Text="{Binding Path=Model.HeaderPost, Mode=TwoWay}" />
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</UserControl>
